Skip to content

Instantly share code, notes, and snippets.

@InersIn
Created October 18, 2020 00:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save InersIn/a2f65bfc478775946cc47377e7ee476e to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
integers = [str(x) for x in range(1,501)]
divider = [3,5]
for x in range(integers.__len__()):
if int(integers[x])%3==0 and int(integers[x])%5==0:
integers[x]="RedRum"
continue
elif int(integers[x])%3==0:
integers[x]="Red"
continue
elif int(integers[x])%5==0:
integers[x]="Rum"
continue
else:
pass
print(",".join(integers))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment