0
Can we use input instead of print in python all the time?
7 Answers
+ 8
ayush goel I'd recommend you to check this out: https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2426/
And also to do the whole Python course here: https://www.sololearn.com/learn/Python/
+ 5
Nope. Input is for the user to enter the data. Print is for outputting this data :)
+ 1
well you might have a program that will add names into a list manually you might have input, but it doesn't necessarily show what you've written, if you need to see what you've written into the program you'd use print
a = list()
b = input("What is your name") # takes user input
a.append(b) # and adds it to a list
print(a) # and prints what name has been added to the list
print shows X data from the code, where input is by default a string variable that will be given by the user when the code runs
0
so, where i can use input
0
if you need user input you use input, you can use it anywhere if you need it to get data from user
0
could you explain it with an example
0
OK