Home  >  Article  >  Backend Development  >  What does sep mean in python?

What does sep mean in python?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-06-27 09:25:0239497browse

There are two default parameters sep and end in print(). The sep function is to set the separator, the default is sep=' ' (space)

What does sep mean in python?

Example:

Related recommendations: " Python Video Tutorial

coffee_cup = ‘coffee’ 
print(“I love my”, coffee_cup, “!”,sep=”*”)

Output:

I love my*coffee*!

The above is the detailed content of What does sep mean in python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is class in pythonNext article:What is class in python