0
What's the significance of 'end' in python? please give examples.
6 Respostas
+ 2
Are you asking about a print function parameter?
If so, 'end' identifies what would be the printed string ending instead of a new line by default.
>>> for _ in range(3):
print(_)
0
1
2
>>> for _ in range(3):
print(_, end=';')
0;1;2;
>>>
+ 1
John , was your answer a wild guess?
0
end denotes a terminator for a method or a class.
def function(numOne):
# process data here.
end
Python isn't my primary language by any means but if you want me to elaborate more just ask.
0
yea it was, I don't use python that much. Good answer.
0
now that I think about it, I'm getting lua mixed up with python. oops.
0
thanks guys