O
O
OccamaRazor2017-03-18 18:46:14
Python
OccamaRazor, 2017-03-18 18:46:14

How to work with modules in python?

I want to split the cycle into two components and place the second part in another file. How to implement? Does the second part also need to be wrapped in a while loop?
As for example, if there are 3 or more files to which you need to connect the same library for work, is it possible to connect the library once so that it is visible in all files?
1 file

if __name__ == "main":
  main()

2 file
while True:
print('1')
print('2')

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2017-03-18
@OccamaRazor

Put pygame aside
Start learning from the basics with any book or https://learnpythonthehardway.org/book/ex0.html

S
Shamsudin Serderov, 2017-03-18
@Steein

Video tutorials on Python 3 to help , you should not start writing in the language without learning!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question