Skip to content

Instantly share code, notes, and snippets.

@cibofdevs
Last active October 30, 2023 21:39
Show Gist options
  • Save cibofdevs/41871a16915fbb1a307b5fecb9576838 to your computer and use it in GitHub Desktop.
Save cibofdevs/41871a16915fbb1a307b5fecb9576838 to your computer and use it in GitHub Desktop.
# Write one for loop to print out each character of the string my_str on a separate line.
my_str = "MICHIGAN"
for i in range(len(my_str)):
print(my_str[i])
@misspage
Copy link

for char in my_str:
print(char)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment