DEV Community

Suchir Ganesh . J
Suchir Ganesh . J

Posted on

BASICS IN PYTHON -VARIABLESS

How do you start doing something is always an mystery when you are completely new to that one particular, I was a bit like, WHAT IS THIS BRUHH. Because I had no coding background when I started an "Bachelor's of Computer Science" degree in MONASH UNIVERSITY, seriously one of the top university and I don't know anything. So I somehow managed and learned something about python using many different websites and youTube helped me a lot. So I'm gonna try teaching you python for FREE....who doesn't like free stuff. So lets get started.

VARIABLES:

Bruh what is a variable.....

Let's start with a example ---- what is your name ??

---- wait I don't have a name

---- whatttt

---- lemme give you a name

This is basically variables -- So these variables can be anything and everything

---- But there should be some rules to name me

---- Oh yess sorry guys

Variable Names
A variable name must start with a letter or the underscore character
----- Damnn is'nt it obvious, how will your name start with a underscoree ewww
_suchir...this is not right X
A variable name cannot start with a number
----- Okay imagine you are a gamer and your friends call you with a number like- 420suchir---bruh no i cannot do this it will be nice if they call you suchir420

A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
----Bruh python don't accept spaces like in between variables and they dont accept symbols like @#$% or anythinggg
Variable names are case-sensitive (age, Age and AGE are three different variables)
--- So my name is Suchir and someone says my name is suchir... these are both different because of the capital letter in front.
A variable name cannot be any of the Python keywords.
---- There are some keywords which cannot be a variable... go check out the link.
See you soon in the next basic topic

Top comments (0)