Basic For Loops Don't Work

Bug description:
Basic For loops don’t work (While loops are fine though)

Expected vs Current Behavior:
Print each element of sequence, but prints nothing

Steps to reproduce:
for i in range(0,5+1,1):

for i in range(5,0-1,-1):

Bug appears at this link:

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Replit Profile:

1 Like

The problem must be related to something else as the code should work.
Difficult to understand on your repl (apart that there is an error on the whole code before as the if will never be executed)

Did you try to put the code in a separate file and let it run with run or via shell with the command python

this looks like a problem with the nix migration creating an invalid configuration. @coltonatreplit

  1. Click Files > ⋮ > Show hidden files
  2. In the .replit file, replace lines 27-29 with
args =  [
    "\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",
1 Like

Create another repl and move the code there only the code.

hi Umar, was this repl created from a template or was it migrated to nix?

nevermind, it’s a nix migration. the problem was a stale migration configuration. thanks for pointing it out!

1 Like