Answers for "converting class to string python"

37

convert string to list python

# To split the string at every character use the list() function
word = 'abc'
L = list(word)
L
# Output:
# ['a', 'b', 'c']

# To split the string at a specific character use the split() function
word = 'a,b,c'
L = word.split(',')
L
# Output:
# ['a', 'b', 'c']
Posted by: Guest on February-18-2020
2

convert string to boolean python

def str2bool(v):

   return str(v).lower() in ("yes", "true", "t", "1")
Posted by: Guest on January-02-2020

Code answers related to "converting class to string python"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language