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 Python Basics (2015) Python for Beginners Create a variable

what have i done wrong

i did the same exact thing

variable.py
'name = "Rishab"'.

1 Answer

Hey Rishab,

You might want to re-watch the previous video.

The first thing you'll want to do is remove the single quotes wrapping your variable name and variable assignment. You'll also want to remove the period at the end.

Look at the following example:

name = 'jacob'

As shown, you can simply write the variable name (In this case, 'name') and then assign it a String value. The String value in this case should be the only thing wrapped in quotes.