Welcome to Admin Junkies, Guest — join our community!

Register or log in to explore all our content and services for free on Admin Junkies.

Python How to Store Stuff in Variables

Jason

Royal member
Bronze Member
Joined
Nov 3, 2022
Messages
1,446
Website
drummerlesson.com
Credits
31
You can store stuff as strings, integers, floating point numbers (floats), or booleans. Tell me if I left something out. Anyway, let's look at some code and then we can explain the details.

Code:
# This is an example of a Boolean.

Joe_is_from_Chile = true

# This is an example of an # integer.

Speed limit = 55

# This is an example of a float.

Another_Way_To_Write_The_Last_Line = 55.0

# This is an example of a string.

Name_Of_Woman = "Jessica"

What we see is kind of self explanatory. In fact, booleans have true or false values. Integers hold integers. Floats hold numbers with decimals and strings hold words.

Please remember, that strings are in single or double quotes with double being more common.
 
Last edited:
If we're talking Python, there's also sets, dicts, lists and tuples (and objects) that you can put in variables.

Also note that for assignments, variable on the left, thing we're putting in the variable on the right.
 
If we're talking Python, there's also sets, dicts, lists and tuples (and objects) that you can put in variables.

Also note that for assignments, variable on the left, thing we're putting in the variable on the right.
The assignment things edited and corrected.
 

Log in or register to unlock full forum benefits!

Log in or register to unlock full forum benefits!

Register

Register on Admin Junkies completely free.

Register now
Log in

If you have an account, please log in

Log in
Activity
So far there's no one here

Users who are viewing this thread

Would You Rather #9

  • Start a forum in a popular but highly competitive niche

    Votes: 5 21.7%
  • Initiate a forum within a limited-known niche with zero competition

    Votes: 18 78.3%
Win this space by entering the Website of The Month Contest

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds