What is end=" " in python? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 6

What is end=" " in python?

22nd Mar 2019, 1:27 AM
Urmi
Urmi - avatar
7 ответов
+ 7
Here, end = " " is an expression on python that assigns a value to a variable. Here end is a variable. It can contain any value. We can use this value to our program. Write the following code to python code playground to understand the expression: end = "Hello World" print(end);
22nd Mar 2019, 2:19 AM
Adnan Zawad Toky
Adnan Zawad Toky - avatar
+ 3
print('hello') print('world') #prints : #hello #world print('hello',end=' ') print('world') #prints : hello world #for more : #https://www.geeksforgeeks.org/gfact-50-JUMP_LINK__&&__python__&&__JUMP_LINK-end-parameter-in-print/ #https://www.geeksforgeeks.org/python-sep-parameter-print/
22nd Mar 2019, 5:42 AM
Daljeet Singh
Daljeet Singh - avatar
+ 1
Adnan Zawad Toky Ohh! Got it! Thanks!
22nd Mar 2019, 2:20 AM
Urmi
Urmi - avatar
+ 1
'end=" "' is a variable being declared. It is saying that the variable "end" will have the value " " (a space). When the variable gets called upon, most likely to be printed, a space will be displayed instead of the word "end". The syntax for declaring a variable is: VARIABLE_NAME = VARIABLE_VALUE Anytime you see something = (one "=") something else, like x = y, you're looking at a variable being created. The word to the left of the "=" is the name of the variable, and everything to the right is its value. Hope that helps
23rd Mar 2019, 3:51 AM
D. Booey 📜
D. Booey 📜 - avatar
0
If you're asking for the type of end is a class str
22nd Mar 2019, 2:20 AM
Andrés Torres Albuja
Andrés Torres Albuja - avatar
22nd Mar 2019, 12:53 PM
Urmi
Urmi - avatar
0
It asigns end to a space
22nd Mar 2019, 3:31 PM
Anshumaan Mishra