What are these '*','|', '...', '->'?
Why the words are colored differently, are they have special meanings?
I even have no idea what's the keyword to search in google... If someone could offer some links explained in detail, that'd be a huge help.
What are these '*','|', '...', '->'?
Why the words are colored differently, are they have special meanings?
I even have no idea what's the keyword to search in google... If someone could offer some links explained in detail, that'd be a huge help.
The full syntax of print()
is:
print(*values, sep=' ', end='\n', file=sys.stdout, flush=False)
And print arguments are:
* indicates that there may be more than one object;' ';sys.stdout will be used which prints objects on the screen;True, the stream is forcibly flushed. Default value: False.| is the same as or in Python, and -> indicates what a function returns. In this case means print() returns a value of None. Try
return print()
or
print(print())
Hope I helped
The asterisk (*) is Python's syntax for an unknown number of arguments. It is introduced in section 4.7.4 of the tutorial and described in detail in section 8.6 of the language reference.
The other funny things are type hints, described under the typing module in the library reference.