GithubHelp home page GithubHelp logo

python's Introduction

Python

https://docs.python.org/3.7/tutorial/index.html

  • Amazon : Build a Modern Web Application in Python

https://aws.amazon.com/getting-started/projects/build-modern-app-fargate-lambda-dynamodb-python/

  • Heroku : Getting Started on Heroku with Python

https://devcenter.heroku.com/articles/getting-started-with-python

Learn Python by Building a Blockchain & Cryptocurrency by Maximilian Schwarzmüller

https://www.udemy.com/learn-python-by-building-a-blockchain-cryptocurrency

05/19/2019

x = int(1)   # x will be 1
y = int(2.8) # y will be 2
z = int("3") # z will be 3
x = float(1)     # x will be 1.0
y = float(2.8)   # y will be 2.8
z = float("3")   # z will be 3.0
w = float("4.2") # w will be 4.2
x = str("s1") # x will be 's1'
y = str(2)    # y will be '2'
z = str(3.0)  # z will be '3.0'
  • blockchain[-1] // get the last one

05/20/2019

>>> cubes = [1, 8, 27, 65, 125]  # something's wrong here
>>> 4 ** 3  # the cube of 4 is 64, not 65!
64
>>> cubes[3] = 64  # replace the wrong value
>>> cubes
[1, 8, 27, 64, 125]
  • 2 ** 7 # 2 to the power of 7 //128
  • String literals can span multiple lines. One way is using triple-quotes: """...""" or '''...'''.
  • word[2:5] # characters from position 2 (included) to 5 (excluded)
  • Note how the start is always included, and the end always excluded. This makes sure that s[:i] + s[i:] is always equal to s:
  • the length of word[1:3] is 2
word = 'python'
>>> word[:2]   # character from the beginning to position 2 (excluded)
'Py'
>>> word[4:]   # characters from position 4 (included) to the end
'on'
>>> word[-2:]  # characters from the second-last (included) to the end
'on'
  • len(s)
All slice operations return a new list containing the requested elements. 
This means that the following slice returns a new (shallow) copy of the list:

>>> squares[:]
[1, 4, 9, 16, 25]

05/21/2019

python's People

Contributors

uwspstar avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.