MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/codehs/comments/186941k/can_someone_help_me_with_spell_it_out_726_python/
r/codehs • u/[deleted] • Nov 28 '23
3 comments sorted by
1
The built-in list() function takes a string as it’s input and returns a list of characters like the one shown. For example:
list(“Sam”) => [“S”, “a”, “m”]
Hope I could help!
1 u/[deleted] Nov 29 '23 Can you show an example like in code and where i should input this in my code?
Can you show an example like in code and where i should input this in my code?
# fill in this function to return a list ontaining each character in the namename = "mark"def spell_name(name):spell_out = list(name)return spell_outprint (spell_name(name))
1
u/Zacurnia_Tate Nov 29 '23
The built-in list() function takes a string as it’s input and returns a list of characters like the one shown. For example:
list(“Sam”) => [“S”, “a”, “m”]
Hope I could help!
1
u/universal-curiosity Feb 10 '24
# fill in this function to return a list ontaining each character in the name
name = "mark"
def spell_name(name):
spell_out = list(name)
return spell_out
print (spell_name(name))