Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

johnathanmyers
johnathanmyers
20,144 Points

python syntax tips anyone?

Anybody have any tips on Python syntax? Sayings that help you remember whether or not quotes should be used in a certain place. In school I remember my teachers teaching us little sayings to remember Math and English topics. (Such as... "I before E except after C".. Or "Please Excuse My Dear And Sally", for the order of operations...) Are there any tricks like this that help you with writing code?

1 Answer

well you talking about Mnemonics? I find the best way to learn python is to dive straight into it.I wil just do a run down of what i have learnt and are the basics of the language. VARIABLES these should start by any letter characters not underscores or numbers declaring a variable in python is as simple as this tree = 'my tree' //inferred

num1 = 10

FUNCTIONS functions start by the word def here is my function which prints hello world

def printHello(): print('hello world')

so these are just the basic stuff learn by messing aroung happy coding