Ask coding questions

← Back to all posts
I need python help
ElijahNarvaez (11)

Me again, hello. In the m.py file I want the clear to happen before my place holder, its doing it after, even tho its in the order I want. How do i fix this?

Comments
hotnewtop
Coder100 (18902)

that's not correct.
The file actually gets executed when you import it, not when you try to access a variable. What you want to do instead is to make functions that return input, instead of making variables.

ElijahNarvaez (11)

@Coder100 Im small brain, i don't get it

MrVoo (90)

@ElijahNarvaez Are you trying to run all the files at the same time?

ElijahNarvaez (11)

@MrVoo Does it do anything if i do?

MrVoo (90)

@ElijahNarvaez Mmmm, what are you trying to do, why can't you just do it on main.py?

Coder100 (18902)

basically, here is your m.py:

def get_rmenu():
  return input('...')

and then to actually get the value, you do:

get_rmenu()

do you understand now?
@ElijahNarvaez

ElijahNarvaez (11)

@Coder100 not really, but ill figure it out

MrVoo (90)

@ElijahNarvaez All you need to do is spam enter to organize .-.