+ 2
What is the difference between print and a string in python 3?
4 Answers
+ 8
print is a function which is used to show data on monitor.
string is a data type, usually text are used as string but any number / numbers, alpha neumeric signs can be used as strong,string expressed in between quotation marks.
+ 5
print is a method with bracket() takes arugments these arugments can be strings,consider this example:
print("Hello")..
on the other hand string data type , a letters or collection of chars between a double or single qoutation marks ..so "Hello" is a string
in other programming languages string is an array of chars
but in python you can think of it like a list since it can be indexed
+ 3
print -> prints whatever is given as argument
string -> collection of ascii characters
print is a function while string is a data type
+ 1
Thank you