NO Worry! Update will be here.

Again check update


  • EdverseXplore
  • Aug 11, 2024
  • Career Guidance

Again check update

Variable are containers that store information that can be manipulated and referenced later by the programmer within the code. 

In python, the programmer does not need to declare the variable type explicitly, we just need to assign to assign the calue to the variable.

Example:

name = "Abdullah"    #type string

age = 20                 #type int

It is always advisable to keep names descriptive and to follow a set of convention while creating varaibles:

  • Variable name can only contain alpha-numeric characters and underscore (A-z, 0-9, and _ )
  • Variable name must start with a letter or the underscore character.
  • Variable are case sensitive.

Example:

Color = "yellow"  #valid variable name

cOlor = "red"       #valid variable name

_color = "blue"    #valid variable name

 

5color = "green"  #invalid

$color = "blue"     #invalid

 

Join the discussion

Ask a question, add a practical insight, or share your takeaway from this article. Your email stays private and is only used for comment validation.

Community Discussion

Comments

0 Comments

Start the conversation

Be the first reader to share a thought, insight, or question on this article.

Add your comment

Keep it clear, respectful, and helpful for other readers.

Thoughtful comments help the whole learning community.
Search Blog

Start typing to search blog posts instantly by title, content, or topic.