Run
# Create string from string literal with single quotes x = str('apple') print(x) # Create string from string literal with double quotes x = str("apple") print(x) # Create string from a number x = str(1024) print(x) # Create string from a complex value x = str(6 + 4j) print(x) # Create string from a list x = str([4, 'apple']) print(x)
Output