Jump to content

Python

Boinbo

Hey guys, quick question here

I'm gonna start learning python, is there anything I should know that's important? Like, misconceptions, or helpful tricks? Thanks in advance!

I lurk 

HP Spectre x360 13t late 2019
Core i5 1035g4
8gb ram
256GB NVME SSD
HP 24mh FHD Monitor 

OnePlus 5
Jabra evolve 75
Razer Blackwidow Lite

Steelseries Rival 3

Link to comment
Share on other sites

Link to post
Share on other sites

If you ever get stuck, youtube and stack overflow are your friends.

Also, search through the programming subforum, you might find answers there as well.

Link to comment
Share on other sites

Link to post
Share on other sites

You should know what the airspeed velocity of an unladen swallow is.

🖥️ Motherboard: MSI A320M PRO-VH PLUS  ** Processor: AMD Ryzen 2600 3.4 GHz ** Video Card: Nvidia GeForce 1070 TI 8GB Zotac 1070ti 🖥️
🖥️ Memory: 32GB DDR4 2400  ** Power Supply: 650 Watts Power Supply Thermaltake +80 Bronze Thermaltake PSU 🖥️

🍎 2012 iMac i7 27";  2007 MBP 2.2 GHZ; Power Mac G5 Dual 2GHZ; B&W G3; Quadra 650; Mac SE 🍎

🍎 iPad Air2; iPhone SE 2020; iPhone 5s; AppleTV 4k 🍎

Link to comment
Share on other sites

Link to post
Share on other sites

learn python 3.6 or higher :)
 

def say_hello(name: str) -> str:
  return f'hello {name}'

print(say_hello('vorticalbox'))

 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

2 & 3 are different enough that people mention it. 

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Dat Guy said:

"Python is a good language."

Could you explain? And I see your signature, I'll learn C# probably after Python and Java script

I lurk 

HP Spectre x360 13t late 2019
Core i5 1035g4
8gb ram
256GB NVME SSD
HP 24mh FHD Monitor 

OnePlus 5
Jabra evolve 75
Razer Blackwidow Lite

Steelseries Rival 3

Link to comment
Share on other sites

Link to post
Share on other sites

Python is very fun language.

 

You can teach it to kids. They will enjoy playing around with it like Lego toys. 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

C is not C#.

 

Python has whitespace as syntax and is horrendously slow.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

55 minutes ago, Dat Guy said:

C is not C#.

 

Python has whitespace as syntax and is horrendously slow.

Faster than trying to train a neural network in javascript....

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, wasab said:

You can teach it to kids.

You can teach kids how to use the numbers from 1 to 10 with colored sticks.

 

Explains Python rather well, honestly.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

After you install python also install VS Code and download the python extension within it. It is much better than using IDLE.

Link to comment
Share on other sites

Link to post
Share on other sites

Also, single-quotes are the same as double-quotes. I prefer single quotes so I don't have to press the SHIFT key.

 

However, you will eventually want to do something like this.

print('don't')

That will give you a SyntaxError so you have two options

#use double quotes
print("don't")

#or put a backslash to create an Escape Sequence
print('don\'t')

When you use that backslash it makes it use the actual character instead of what it means in the language.

More about that here.

https://docs.python.org/2.0/ref/strings.html

 

I know this is not something that is necessary for a beginner however single quotes is something in python that is different than other languages.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, T9987 said:

After you install python also install VS Code and download the python extension within it.

Note that this will eat another half GiB of RAM which is insane.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, T9987 said:

After you install python also install VS Code and download the python extension within it. It is much better than using IDLE.

if you're doing python development pycharm or go home. ?

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, vorticalbox said:

if you're doing python development pycharm

The rare occasions where I write Python code are perfectly handled by Acme tbh.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Dat Guy said:

The rare occasions where I write Python code are perfectly handled by Acme tbh.

I just like the default python env it creates for your projects and the ability to search and add modules form the ui

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/30/2019 at 5:48 AM, vorticalbox said:

if you're doing python development pycharm or go home. ?

I like VS Code because of the live share extension where I can work on code with friends. I'm sure both have their advantages and disadvantages but in the end it comes down to preference.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, T9987 said:

I like VS Code because of the live share extension where I can work on code with friends. I'm sure both have their advantages and disadvantages but in the end it comes down to preference.

I use vscode at work for node development, its actually very very good.

 

Live share is also great

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

As a fairly young programmer I'm constantly trying to do things for myself but trust me, if you don't know how to do something even if it's minor, just ask, and if you really can't solve a problem don't give up, ask for someone to show you what is wrong with it because sometimes you just need a second pair of eyes. Resource-wise check out Stack-overflow, *here*, W3schools and youtube (some people include dan bader and the coding train). Also I find that programming once a day no matter how long will improve your capabilities much more than big chunks (assuming you've learnt the basics)

I'm a python programmer and I play trombone

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/28/2019 at 5:35 PM, Dat Guy said:

You can teach kids how to use the numbers from 1 to 10 with colored sticks.

 

Explains Python rather well, honestly.

I teach my kid sister calculus. Kids can amaze you

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/30/2019 at 3:48 AM, vorticalbox said:

if you're doing python development pycharm or go home. ?

Unless you regularly work in several languages and don't want to have to remember the idiosyncrasies of several different IDEs

Link to comment
Share on other sites

Link to post
Share on other sites

Learn Python 3, mainly, as 2 is end of life starting next year.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×