Skip to content

My notes while learning python. Some of them can be used as tutorials while self-learning or teaching beginners.

Notifications You must be signed in to change notification settings

swarajdalmia/python-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python features

  • Python is a dynamic, interpreted (bytecode-compiled) language. There are no type declarations of variables, parameters, functions, or methods in source code. This makes the code short and flexible, and you lose the compile-time type checking of the source code. Python tracks the types of all values at runtime and flags code that does not make sense as it runs.

  • The end of a line marks the end of a statement, so no need for semicolons.

  • Comments begin with "#"

  • Python source files use the ".py" extension and are called "modules."

  • When a Python file is run directly, the special variable "__name__" is set to "__main__". Therefore, it's common to have the boilerplate if __name__ ==... shown above to call a main() function when the module is run directly, but not when the module is imported by some other module.

  • In a standard Python program, the list sys.argv contains the command-line arguments in the standard way with sys.argv[0] being the program itself, sys.argv[1] the first argument, and so on. If you know about argc, or the number of arguments, you can simply request this value from Python with len(sys.argv).

A lot of these are taken form here.

About

My notes while learning python. Some of them can be used as tutorials while self-learning or teaching beginners.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages