Menu                                    Log in
 HTML        CSS      JAVASCRIPT           SQL     PYTHON     J
Python Tutorial                Lightening Deals on all your
                               Pet's Needs
   Python HOME
   Python Intro
Python    Introduction
 Python Get Started
   Python Syntax
  ‹ Previous                                          Next ›
   Python Comments
   Python Variables                 
 Python Data Types
What  is Python?
   Python Numbers
Python  is aCasting
   Python    popular programming language. It was
created
   Pythonby Strings
            Guido van Rossum, and released in
                             
1991.
   Python Booleans
It isPython
      used for:
            Operators
   Python Lists            
     web development (server-side),
   Python Tuples
     software development, 
     mathematics,
   Python Sets             
     system
   Python   scripting.
          Dictionaries              
 Python If...Else
What can Python do?
   Python While Loops
     Python
   Python   can
          For   be used on a server to create web
              Loops
     applications.
   Python Functions
     Python can be used alongside software to
   Python
     createLambda
             workflows.
   Python
     PythonArrays
              can connect to database systems. It
     can also
   Python      read and modify files.
           Classes/Objects
     Python can be used to handle big data and
   Python Inheritance
     perform complex mathematics.
   Python
     PythonIterators
              can be used for rapid prototyping, or
     for production-ready
   Python  Polymorphism software development.
   Python Scope
Why  Python?
 Python Modules
   Python Dates
     Python works on different platforms (Windows,
     Mac, Linux,
   Python Math Raspberry Pi, etc).
     Python has a simple syntax similar to the
   Python JSON
     English language.
   Python
     Python RegEx
              has syntax that allows developers to
   Python
     write PIP
            programs with fewer lines than some
     other Try...Except
   Python   programming languages.
     Python runs on an interpreter system,
   Python User Input
     meaning that code can be executed as soon as
   Python   String Formatting
     it is written. This means that prototyping can
     be very quick.
File Handling
     Python can be treated in a procedural way, an
     object-oriented way or a functional way.
   Python File Handling
Good  toRead
 Python  knowFiles
   Python Write/Create Files
     The most recent major version of Python is
   Python Delete Files
     Python 3, which we shall be using in this
     tutorial. However, Python 2, although not
Python Modules
     being updated with anything other than
     security updates, is still quite popular.
   NumPy
     In thisTutorial
             tutorial Python will be written in a text
   Pandas
     editor.Tutorial
             It is possible to write Python in an
     Integrated
   SciPy  TutorialDevelopment Environment, such as
     Thonny, Pycharm, Netbeans or Eclipse which
   Django Tutorial
     are particularly useful when managing larger
     collections of Python files.
Python Matplotlib
Python   Syntax compared to other
  Matplotlib Intro
programming        languages
  Matplotlib Get Started
   Matplotlib Pyplot
    Python was designed for readability, and has
   Matplotlib Plotting to the English language with
    some similarities
   Matplotlib
    influenceMarkers
                from mathematics.
    Python uses
   Matplotlib Line new lines to complete a
    command, as opposed to other programming
   Matplotlib Labels
    languages which often use semicolons or
   Matplotlib Grid
    parentheses.
    Python relies
   Matplotlib       on indentation, using whitespace,
              Subplot
    to define scope; such as the scope of loops,
   Matplotlib Scatter
    functions and classes. Other programming
   Matplotlib Bars
    languages often use curly-brackets for this
   Matplotlib
    purpose.Histograms
   Matplotlib Pie Charts
Example      Get your own Python Server
Machine Learning
   Getting Started
  print("Hello, World!")
   Mean Median Mode
   Standard
  Try         Deviation
      it Yourself »
   Percentile
   Data Distribution
   Normal Data Distribution
      Video:
   Scatter Plot     Python Introduction
   Linear Regression
   Polynomial Regression
   Multiple Regression
   Scale
  ‹ Previous                                          Next ›
   Train/Test
   Decision Tree
   Confusion Matrix
                 W3schools Pathfinder
   Hierarchical Clustering
             Track your progress - it's free!
   Logistic Regression
   Grid Search
   Categorical Data
   K-means           Sign Up       Log in
   Bootstrap Aggregation
   Cross Validation
   AUC - ROC Curve
   K-nearest neighbors
                  ADVERTISEMENT
Python MySQL
   MySQL Get Started
   MySQL Create Database
   MySQL Create Table PICKER
              COLOR
   MySQL Insert
   MySQL Select
   MySQL Where
   MySQL Order By
   MySQL Delete
   MySQL Drop Table
   MySQL Update
                      ADVERTISEMENT
   MySQL Limit
   MySQL Join
Python MongoDB
   MongoDB Get Started
   MongoDB Create DB
   MongoDB Collection
   MongoDB Insert
   MongoDB Find
   MongoDB Query
   MongoDB Sort
   MongoDB Delete
   MongoDB Drop Collection
   MongoDB Update
   MongoDB Limit
                           
Python Reference
             SPACES
   Python Overview
                     UPGRADE
   Python Built-in Functions
   Python String Methods
                         AD-FREE
   Python List Methods
   Python Dictionary Methods
                      NEWSLETTER
   Python Tuple Methods
                GET CERTIFIED
   Python Set Methods
   Python File Methods
                 CONTACT US
   Python Keywords
   Python Exceptions
   Python Glossary
         Top Tutorials
Module Reference
           HTML Tutorial
                     CSS Tutorial
   Random Module JavaScript Tutorial
   Requests Module How To Tutorial
                     SQL Tutorial
   Statistics Module
                   Python Tutorial
   Math Module W3.CSS Tutorial
   cMath Module Bootstrap Tutorial
                     PHP Tutorial
                     Java Tutorial
Python How To        C++ Tutorial
                   jQuery Tutorial
   Remove List Duplicates
   Reverse a String
             Top References
   Add Two Numbers
                  HTML Reference
Python Examples    CSS Reference
               JavaScript Reference
   Python ExamplesSQL Reference
                 Python Reference
   Python Compiler
                 W3.CSS Reference
   Python Exercises
                Bootstrap Reference
   Python Quiz    PHP Reference
                    HTML Colors
   Python Server Java Reference
                 Angular Reference
   Python Bootcamp
                 jQuery Reference
   Python Certificate
                    Top Examples
                       HTML Examples
                        CSS Examples
                    JavaScript Examples
                     How To Examples
                        SQL Examples
                     Python Examples
                     W3.CSS Examples
                    Bootstrap Examples
                       PHP Examples
                       Java Examples
                        XML Examples
                      jQuery Examples
                    Get Certified
                       HTML Certificate
                        CSS Certificate
                    JavaScript Certificate
                    Front End Certificate
                        SQL Certificate
                     Python Certificate
                       PHP Certificate
                      jQuery Certificate
                       Java Certificate
                        C++ Certificate
                         C# Certificate
                        XML Certificate
                     
           FORUM       ABOUT       CLASSROOM
           W3Schools is optimized for learning and
          training. Examples might be simplified to
           improve reading and learning. Tutorials,
          references, and examples are constantly
           reviewed to avoid errors, but we cannot
         warrant full correctness of all content. While
          using W3Schools, you agree to have read
         and accepted our terms of use, cookie and
                         privacy policy.
           Copyright 1999-2024 by Refsnes Data. All
           Rights Reserved. W3Schools is Powered by
                           W3.CSS.