0

how to import other python codes in a single code

sorry to interrupt.(if this question is repeated please give me the link) im trying to make a miscellaneous program(thats why im not in sololoearn) and, it needs to have different files in it at once like i made a what.py and how.py and is making why.py in why.py: import how.py import what.py is it possible?(and will the codes work??) please help

9th May 2021, 11:01 AM
Shubhadeep Saha
Shubhadeep Saha - avatar
4 Answers
+ 5
Your question "is it possible? (and will the codes work??)" Why don't you try it first on the ide that you are using rn? AFAIK, it should work if you remove ".py" in the import statements.
9th May 2021, 11:15 AM
Genuine Stalwart
Genuine Stalwart - avatar
+ 3
use the search bar. And not here in SL, gotta be on a local machine when code is in same directory
9th May 2021, 11:05 AM
Slick
Slick - avatar
+ 2
sorry bruh i no use abuse words again
9th May 2021, 11:22 AM
Shubhadeep Saha
Shubhadeep Saha - avatar
- 3
bruh wtf i have vs code im not dumb enof to do it here
9th May 2021, 11:12 AM
Shubhadeep Saha
Shubhadeep Saha - avatar