0
Hi guys what's the difference between string and print?
Python3
7 Réponses
+ 2
Print is a function to print something on the screen whereas string is a data type.
x='hi'
print(x) #output=hi
Here x is a variable which has string data type and we use print function to print x variable on the screen.
+ 1
If you mean the functions:
Str(x) turns the valuable x into a string datatype
print(x) prints out the variable x so you can see the value when you run your code
0
Send me a piece of code if you didn't understand my explanation and i will show you in the code.
0
We use print(hello world) and string(example..) i don't really see the difference
0
In Python?
0
Yes
0
Ok I understand now