Discuss Scratch
- Discussion Forums
- » Things I'm Making and Creating
- » Python programming language
- Knightbot63
-
1000+ posts
Python programming language
(#960)Can it also go outside of .py files?
…you can go outside of the class function. That's what it does. That's like saying “What's so great about food? Besides the fact that you can eat it.”
Working on an RPG. Consistently losing followers because of inactivity.
I head to forums time-to-time. Not as much as I used to.
- -TwentyFour-
-
500+ posts
Python programming language
I wanna learn python. Can you guys suggest best python for beginners tutorial in YT?
- mumu245
-
1000+ posts
Python programming language
I don't watch videos, but I can suggest I wanna learn python. Can you guys suggest best python for beginners tutorial in YT?freecodecamp.
- ToastersUnited
-
1000+ posts
Python programming language
I find books easier. I used a blue one i forget what its called though. There are great ones on like amazon and stuff I wanna learn python. Can you guys suggest best python for beginners tutorial in YT?
I'm hosting Country Clash Minecraft, a minecraft server where you can join or create a nation, trade, engage in politics, go to war and more!
CCMC is a Country Clash RP spinoff. It is currently in a trial period where CCRP admins will observe the server and see whether or not it should continue.
CCMC uses a custom map with volcanoes, nether and end islands, winding rivers and more!
CCMC will start within the next two days or so. It has a 10 player limit at any time. Anyone can join, as long as you have a copy of Minecraft Java Edition or Minecraft Bedrock Edition
![](https://u.cubeupload.com/teneuro/Screenshot20231130at.png)
- GoldenAlbans
-
55 posts
Python programming language
I'm good with raspberry pi's (as far as the hardware goes) but I have been sort of faking the python programming. Can anyone recommend a learning resource that is actually useful?
I’m not much on speeches. That’s all.
Follow @GoldenAlbans! People don’t usually put quotes in signatures.
- UnscrambledEgg
-
100+ posts
Python programming language
I'm not the best person to ask since my learning preferences are different but I usually read documents of different functions and their layouts. I wanna learn python. Can you guys suggest best python for beginners tutorial in YT?
- TeenySpoon
-
500+ posts
Python programming language
The official Python documentation is really useful. I'm good with raspberry pi's (as far as the hardware goes) but I have been sort of faking the python programming. Can anyone recommend a learning resource that is actually useful?
You can also search up some coding practices like FizzBuzz.
⚜ TeenySpoon ⚜ Alt: TeenyTea ⚜
⚜ An absent-minded programmer/artist ⚜
A Random Pen Window Manager
⚜ Me ⚜ TeenyFork ⚜ TeenyKnife ⚜
“We are pilgrims on the journey
We are travelers on the road
We are here to help each other
Walk the mile and bear the load”
- “The Servant Song”, David Haas
⚜ An absent-minded programmer/artist ⚜
A Random Pen Window Manager
⚜ Me ⚜ TeenyFork ⚜ TeenyKnife ⚜
“We are pilgrims on the journey
We are travelers on the road
We are here to help each other
Walk the mile and bear the load”
- “The Servant Song”, David Haas
- mumu245
-
1000+ posts
Python programming language
Not for the Pi though. For the hardware side, there is always Raspberry Pi Projects and the docs (very well written), also stackoverflow. Just browse them and see what you can make of it. Don't copy-paste.The official Python documentation is really useful. I'm good with raspberry pi's (as far as the hardware goes) but I have been sort of faking the python programming. Can anyone recommend a learning resource that is actually useful?
You can also search up some coding practices like FizzBuzz.
- TeenySpoon
-
500+ posts
Python programming language
Oh I see, the way I read it I thought the person was talking about Python in general.Not for the Pi though. For the hardware side, there is always Raspberry Pi Projects and the docs (very well written), also stackoverflow. Just browse them and see what you can make of it. Don't copy-paste.The official Python documentation is really useful. I'm good with raspberry pi's (as far as the hardware goes) but I have been sort of faking the python programming. Can anyone recommend a learning resource that is actually useful?
You can also search up some coding practices like FizzBuzz.
⚜ TeenySpoon ⚜ Alt: TeenyTea ⚜
⚜ An absent-minded programmer/artist ⚜
A Random Pen Window Manager
⚜ Me ⚜ TeenyFork ⚜ TeenyKnife ⚜
“We are pilgrims on the journey
We are travelers on the road
We are here to help each other
Walk the mile and bear the load”
- “The Servant Song”, David Haas
⚜ An absent-minded programmer/artist ⚜
A Random Pen Window Manager
⚜ Me ⚜ TeenyFork ⚜ TeenyKnife ⚜
“We are pilgrims on the journey
We are travelers on the road
We are here to help each other
Walk the mile and bear the load”
- “The Servant Song”, David Haas
- kkidslogin
-
1000+ posts
Python programming language
Sometimes the gymnastics I have to do in Python makes me laugh. This is real code from a web server I'm designing:
db["threads"].append(["Back online!", len(database.to_primitive(db["posts"])) - 1])
- __Falcon-Games__
-
1000+ posts
Python programming language
Too readable. Sometimes the gymnastics I have to do in Python makes me laugh. This is real code from a web server I'm designing:db["threads"].append(["Back online!", len(database.to_primitive(db["posts"])) - 1])
db.__getitem__.__call__("threads".__str__.__call__()) = db.__getitem__.__call__("threads".__str__.__call__()).__add__.__call__([("Back online!").__str__.__call__(), database.to_primitive.__call__(db.__getitem__.__call__("posts")).__len__.__call__()])
Last edited by __Falcon-Games__ (Sept. 24, 2023 12:30:55)
Try out Noml!
- kkidslogin
-
1000+ posts
Python programming language
(#971)Ach ugh. How about this?Too readable. Sometimes the gymnastics I have to do in Python makes me laugh. This is real code from a web server I'm designing:db["threads"].append(["Back online!", len(database.to_primitive(db["posts"])) - 1])db.__getitem__.__call__("threads".__str__.__call__()) = db.__getitem__.__call__("threads".__str__.__call__()).__add__.__call__([("Back online!").__str__.__call__(), database.to_primitive.__call__(db.__getitem__.__call__("posts")).__len__.__call__()])
post_name = db["posts"][db["threads"][0][i]][0] post_author = db["posts"][db["threads"][0][i]][1] post_content = db["posts"][db["threads"][0][i]][2]
It's all in one “dictionary” because this is actually the replit.db class, so I only get one
square brackets go brrrr
Last edited by kkidslogin (Sept. 24, 2023 18:33:40)
- __Falcon-Games__
-
1000+ posts
Python programming language
That's also too readable.(#971)Ach ugh. How about this?Too readable. Sometimes the gymnastics I have to do in Python makes me laugh. This is real code from a web server I'm designing:db["threads"].append(["Back online!", len(database.to_primitive(db["posts"])) - 1])db.__getitem__.__call__("threads".__str__.__call__()) = db.__getitem__.__call__("threads".__str__.__call__()).__add__.__call__([("Back online!").__str__.__call__(), database.to_primitive.__call__(db.__getitem__.__call__("posts")).__len__.__call__()])post_name = db["posts"][db["threads"][0][i]][0] post_author = db["posts"][db["threads"][0][i]][1] post_content = db["posts"][db["threads"][0][i]][2]
It's all in one “dictionary” because this is actually the replit.db class, so I only get one
square brackets go brrrr
exec("".join([chr(x) for x in [105, 109, 112, 111, 114, 116, 32, 115, 121, 115, 10, 109, 97, 105, 110, 32, 61, 32, 115, 121, 115, 46, 109, 111, 100, 117, 108, 101, 115, 91, 34, 95, 95, 109, 97, 105, 110, 95, 95, 34, 93, 10, 115, 101, 116, 97, 116, 116, 114, 40, 109, 97, 105, 110, 44, 32, 34, 112, 111, 115, 116, 95, 110, 97, 109, 101, 34, 44, 32, 100, 98, 91, 34, 112, 111, 115, 116, 115, 34, 93, 91, 100, 98, 91, 34, 116, 104, 114, 101, 97, 100, 115, 34, 93, 91, 48, 93, 91, 108, 111, 99, 97, 108, 115, 40, 41, 46, 95, 95, 103, 101, 116, 105, 116, 101, 109, 95, 95, 40, 34, 105, 34, 41, 93, 93, 91, 48, 93, 41, 10, 115, 101, 116, 97, 116, 116, 114, 40, 109, 97, 105, 110, 44, 32, 34, 112, 111, 115, 116, 95, 97, 117, 116, 104, 111, 114, 34, 44, 32, 100, 98, 91, 34, 112, 111, 115, 116, 115, 34, 93, 91, 100, 98, 91, 34, 116, 104, 114, 101, 97, 100, 115, 34, 93, 91, 48, 93, 91, 108, 111, 99, 97, 108, 115, 40, 41, 46, 95, 95, 103, 101, 116, 105, 116, 101, 109, 95, 95, 40, 34, 105, 34, 41, 93, 93, 91, 49, 93, 41, 10, 115, 101, 116, 97, 116, 116, 114, 40, 109, 97, 105, 110, 44, 32, 34, 112, 111, 115, 116, 95, 99, 111, 110, 116, 101, 110, 116, 34, 44, 32, 100, 98, 91, 34, 112, 111, 115, 116, 115, 34, 93, 91, 100, 98, 91, 34, 116, 104, 114, 101, 97, 100, 115, 34, 93, 91, 48, 93, 91, 91, 108, 111, 99, 97, 108, 115, 40, 41, 46, 95, 95, 103, 101, 116, 105, 116, 101, 109, 95, 95, 40, 34, 105, 34, 41, 93, 93, 91, 50, 93, 93, 41]]))
Try out Noml!
- kkidslogin
-
1000+ posts
Python programming language
(#973)i ' m i n p a i n n o wThat's also too readable.(#971)Ach ugh. How about this?Too readable. Sometimes the gymnastics I have to do in Python makes me laugh. This is real code from a web server I'm designing:db["threads"].append(["Back online!", len(database.to_primitive(db["posts"])) - 1])db.__getitem__.__call__("threads".__str__.__call__()) = db.__getitem__.__call__("threads".__str__.__call__()).__add__.__call__([("Back online!").__str__.__call__(), database.to_primitive.__call__(db.__getitem__.__call__("posts")).__len__.__call__()])post_name = db["posts"][db["threads"][0][i]][0] post_author = db["posts"][db["threads"][0][i]][1] post_content = db["posts"][db["threads"][0][i]][2]
It's all in one “dictionary” because this is actually the replit.db class, so I only get one
square brackets go brrrrexec("".join([chr(x) for x in [105, 109, 112, 111, 114, 116, 32, 115, 121, 115, 10, 109, 97, 105, 110, 32, 61, 32, 115, 121, 115, 46, 109, 111, 100, 117, 108, 101, 115, 91, 34, 95, 95, 109, 97, 105, 110, 95, 95, 34, 93, 10, 115, 101, 116, 97, 116, 116, 114, 40, 109, 97, 105, 110, 44, 32, 34, 112, 111, 115, 116, 95, 110, 97, 109, 101, 34, 44, 32, 100, 98, 91, 34, 112, 111, 115, 116, 115, 34, 93, 91, 100, 98, 91, 34, 116, 104, 114, 101, 97, 100, 115, 34, 93, 91, 48, 93, 91, 108, 111, 99, 97, 108, 115, 40, 41, 46, 95, 95, 103, 101, 116, 105, 116, 101, 109, 95, 95, 40, 34, 105, 34, 41, 93, 93, 91, 48, 93, 41, 10, 115, 101, 116, 97, 116, 116, 114, 40, 109, 97, 105, 110, 44, 32, 34, 112, 111, 115, 116, 95, 97, 117, 116, 104, 111, 114, 34, 44, 32, 100, 98, 91, 34, 112, 111, 115, 116, 115, 34, 93, 91, 100, 98, 91, 34, 116, 104, 114, 101, 97, 100, 115, 34, 93, 91, 48, 93, 91, 108, 111, 99, 97, 108, 115, 40, 41, 46, 95, 95, 103, 101, 116, 105, 116, 101, 109, 95, 95, 40, 34, 105, 34, 41, 93, 93, 91, 49, 93, 41, 10, 115, 101, 116, 97, 116, 116, 114, 40, 109, 97, 105, 110, 44, 32, 34, 112, 111, 115, 116, 95, 99, 111, 110, 116, 101, 110, 116, 34, 44, 32, 100, 98, 91, 34, 112, 111, 115, 116, 115, 34, 93, 91, 100, 98, 91, 34, 116, 104, 114, 101, 97, 100, 115, 34, 93, 91, 48, 93, 91, 91, 108, 111, 99, 97, 108, 115, 40, 41, 46, 95, 95, 103, 101, 116, 105, 116, 101, 109, 95, 95, 40, 34, 105, 34, 41, 93, 93, 91, 50, 93, 93, 41]]))
- zaid1442011
-
500+ posts
Python programming language
Forgets that 0 isn't positive or negative:
![](https://assets.scratch.mit.edu/get_image/.%2E/d793d9a6a1e5f36ffe59b0247cd5ddab.png)
*Remembers that I could leave the finish index empty*
![](https://assets.scratch.mit.edu/get_image/.%2E/6a38006e520fefd40d1f05e90ee864ff.png)
![](https://assets.scratch.mit.edu/get_image/.%2E/d793d9a6a1e5f36ffe59b0247cd5ddab.png)
*Remembers that I could leave the finish index empty*
![](https://assets.scratch.mit.edu/get_image/.%2E/6a38006e520fefd40d1f05e90ee864ff.png)
I am a guy who codes weird stuff. Don’t check my GitHub only if you want stupid HTML pages (or something to host them). Check my platformer if you want to see something to see.
Profiles: GitHub.
You won't understand stuff in my signature because I talk about stuff in the ATs (Advanced Topics).
Check out this song for @griffpatch https://scratch.mit.edu/projects/887382049/
- zaid1442011
-
500+ posts
Python programming language
Do you know why this is happening?
![](https://assets.scratch.mit.edu/get_image/.%2E/607333d4960f4ca1caf8d6c4fb88d4c3.png)
![](https://assets.scratch.mit.edu/get_image/.%2E/607333d4960f4ca1caf8d6c4fb88d4c3.png)
I am a guy who codes weird stuff. Don’t check my GitHub only if you want stupid HTML pages (or something to host them). Check my platformer if you want to see something to see.
Profiles: GitHub.
You won't understand stuff in my signature because I talk about stuff in the ATs (Advanced Topics).
Check out this song for @griffpatch https://scratch.mit.edu/projects/887382049/
- mybearworld
-
1000+ posts
Python programming language
(#976)Whatever IDE you're using probably has a length limit on the output.
Do you know why this is happening?
Signatures are the only place where assets links still work.
- zaid1442011
-
500+ posts
Python programming language
(#977)I was using w3schools.com's Try-it editor(#976)Whatever IDE you're using probably has a length limit on the output.
Do you know why this is happening?
I got it working in a Debian (I am to lazy to get my Mac, also I am on a Chromebook) ternimal, and it is working fine (till now). Now I have to wait till it finishes writing i's value 100000000000 times (which increases by 1 every time it loops through).
I am a guy who codes weird stuff. Don’t check my GitHub only if you want stupid HTML pages (or something to host them). Check my platformer if you want to see something to see.
Profiles: GitHub.
You won't understand stuff in my signature because I talk about stuff in the ATs (Advanced Topics).
Check out this song for @griffpatch https://scratch.mit.edu/projects/887382049/
- mumu245
-
1000+ posts
Python programming language
(#978)Use a for loop, it might be faster.(#977)I was using w3schools.com's Try-it editor(#976)Whatever IDE you're using probably has a length limit on the output.
Do you know why this is happening?
I got it working in a Debian (I am to lazy to get my Mac, also I am on a Chromebook) ternimal, and it is working fine (till now). Now I have to wait till it finishes writing i's value 100000000000 times (which increases by 1 every time it loops through).
- zaid1442011
-
500+ posts
Python programming language
(#979)I stoped running it. Maybe you try it.(#978)Use a for loop, it might be faster.(#977)I was using w3schools.com's Try-it editor(#976)Whatever IDE you're using probably has a length limit on the output.
Do you know why this is happening?
I got it working in a Debian (I am to lazy to get my Mac, also I am on a Chromebook) ternimal, and it is working fine (till now). Now I have to wait till it finishes writing i's value 100000000000 times (which increases by 1 every time it loops through).
I am a guy who codes weird stuff. Don’t check my GitHub only if you want stupid HTML pages (or something to host them). Check my platformer if you want to see something to see.
Profiles: GitHub.
You won't understand stuff in my signature because I talk about stuff in the ATs (Advanced Topics).
Check out this song for @griffpatch https://scratch.mit.edu/projects/887382049/