+ 1
why do we use str function?
1 Antwort
0
Hey There Hemaprabha S
We Having 3 Main Data-types In Python-
1. Integer(Includes Whole Numbers)
2. Floating Point(Numbers With Decimals)
3. String(Sequence Of Characters)
If We Talk About String Then Strings Are Immutable In Nature It Means After Initialising You Can’t Make Changes In Your String But You Can Perform Concatenation.
And Yes We Use str() Function To convert any datatype like integer,floating point to string datatype.
x=92
print(str(x))
That str() function will print your value of x as string.