Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.35 KB

File metadata and controls

52 lines (40 loc) · 1.35 KB

13 - Programming Basics with Python

Python one of my favorite programming languages. It is easy to learn and has a lot of libraries. It is a great language to start with. For me is Python one of the most versatile programming languages. You can create a lot of things with Python for example:

  • Web applications
  • Web scraping
  • Automation
  • Machine learning
  • Data science
  • AI

Python basics

Variables types

  • String
  • Integer
  • Float
  • Boolean
  • Lists
  • Sets
  • Dictionary
  • And a lot more but they are not used in the course

Variables are objects?

A variable is a reference to an object. The variable is not the object. The variable is a pointer to the object. This means it can have multiple functions and methods. You can check what type of variable it is with the type() function. A python variable is overwrite. For example Golang is not overwriteable.

These are some methods and functions that you can use on variables:

  • str() - cast to string
  • int() - cast to int
  • set() - cast to set
  • f"{}" - format string
  • .isdigit() - check if string is digit
  • .split() - split string
  • .append() - add element to list
  • .add() - add element to set
  • .remove() - remove element from set

CODE

View github.com:Joeri-Abbo/techworld-with-nana-my-python-project for the source code. Per lecture there is a commit with the code for that lecture.