book
  • README
  • cheatsheet
    • bash
      • builtin
      • syntactic sugar
      • cmd
      • havefun
    • text-processing
      • awk
      • sed
      • html
      • json
      • regex
      • unicode
    • osx
    • curl
    • tricky
    • widget
    • proxy
    • colors
    • math
    • media
    • ssl
      • keystore
      • verification
      • server
      • client
      • tricky
    • windows
      • powershell
      • choco
      • wsl
      • wt
      • shortcut
      • clsid
      • env
      • shell:folder
  • vim
    • nvim
    • install
    • color
    • plugins
      • usage
      • other plugins
      • deprecated
    • tricky
    • viml
    • windows
    • troubleshooting
  • devops
    • admin tools
    • ssh
    • git
      • config
      • alias
      • submodule
      • eol
      • example
      • gerrit
        • gerrit API
      • github
      • troubleshooting
      • tricky
      • statistics
    • pre-commit
    • release-tools
    • tmux
      • cheatsheet
    • ansible
    • vault
    • artifactory
      • api
      • cli
      • aql
      • nginx cert
    • klocwork
      • kwadmin
      • kwserver
      • api
      • q&a
    • elk
    • mongodb
    • android
    • mobile
  • jenkins
    • config
      • windows
    • appearance
    • troubleshooting
    • jenkinsfile
      • utility
      • parallel
      • build
      • envvar
      • properties
      • trigger
      • node
    • script
      • job
      • build
      • stage
      • agent
      • security & authorization
      • exception
      • monitor
      • tricky
    • api
      • blueocean
    • cli
    • plugins
      • kubernetes
      • docker
      • shared-libs
      • lockable-resource
      • ansicolor
      • badge
      • groovy-postbuild
      • simple-theme
      • customizable-header
      • artifactory
      • jira-steps
      • job-dsl
      • build-timeline
      • crumbIssuer
      • coverage
      • uno-choice
      • tricky
  • virtualization
    • kubernetes
      • init
        • kubespray
        • kubeadm
          • environment
          • crio v1.30.4
          • docker v1.15.3
          • HA
        • addons
        • etcd
      • kubectl
        • pod
        • deploy
        • replicasets
        • namespace
        • secrets
      • node
      • certificates
      • events
      • kubeconfig
      • kubelet
      • troubleshooting
      • cheatsheet
      • auth
      • api
      • tools
        • monitor
        • helm
        • network
        • minikube
    • docker
      • run & exec
      • voume
      • remove
      • show info
      • dockerfile
      • dockerd
      • tricky
      • troubleshooting
      • windows
    • crio
    • podman
  • ai
    • prompt
  • osx
    • apps
      • init
      • brew
    • defaults
    • system
    • network
    • script
    • tricky
  • linux
    • devenv
    • util
      • time & date
      • output formatting
      • params
      • tricky
    • nutshell
    • disk
    • network
    • troubleshooting
    • system
      • apt/yum/snap
      • authorization
      • apps
      • x11
    • ubuntu
      • systemctl
      • x
    • rpi
  • programming
    • groovy
    • python
      • config
      • basic
      • list
      • pip
      • q&a
    • others
    • archive
      • angular
      • maven
      • mysql
        • installation
        • logs
      • ruby
        • rubyInstallationQ&A
  • tools
    • fonts
    • html & css
    • Jira & Confluence
    • node & npm
      • gitbook
      • hexo
      • github.page
      • code themes
    • app
      • microsoft office
      • vscode
      • virtualbox
      • iterm2
      • browser
      • skype
      • teamviewer
      • others
  • quotes
  • english
Powered by GitBook
On this page
  • version capatibility
  • environment
  • Positional notation
  • The Big Book of Small Python Projects

Was this helpful?

  1. programming
  2. python

basic

PreviousconfigNextlist

Last updated 7 months ago

Was this helpful?

version capatibility

Supported Ubuntu and Python Versions

[!NOTE|label:references:]

  • NOTE: Python2.7 (all), Python 3.6 (bionic), Python 3.8 (focal), Python 3.10 (jammy) are not provided by deadsnakes as upstream ubuntu provides those packages.

-
UBUNTU 18.04 ( BIONIC )
UBUNTU 20.04 ( FOCAL )
UBUNTU 22.04 ( JAMMY )

python 2.3

✔

python 2.4

✔

python 2.5

✔

python 2.6

✔

python 2.7

✔

python 3.1

✔

python 3.2

✔

python 3.3

✔

python 3.4

✔

python 3.5

✔

✔

python 3.6

✔

✔

python 3.7

✔

✔

✔

python 3.8

✔

✔

✔

python 3.9

✔

✔

✔

python 3.10

✔

✔

✔

python 3.11

✔

✔

✔

python 3.12

✔

✔

✔

environment

list included modules

$ python -c 'help("modules")'

Please wait a moment while I gather a list of all available modules...

__future__          _warnings           graphlib            runpy
_abc                _weakref            grp                 sched
_aix_support        _weakrefset         gzip                secrets
...

list lib paths

$ python -c 'import sys; print (sys.path)'
['', '/usr/lib/python39.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']

to Binary

  • octal to binary

    >>> bin( int('0o10', 8) )
    '0b1000'
    >>> bin( int('0o17', 8) )
    '0b1111'
  • decimal to binary

    >>> bin(2)
    '0b10'
    >>> bin(10)
    '0b1010'
    • or

      >>> format( 3, 'b' )
      '11'
      >>> format( 15, 'b' )
      '1111'
  • hexadecimal to binary

>>> bin( int('a', 16) )
'0b1010'
>>> bin( int('f', 16) )
'0b1111'

to Octal

  • binary to octal

    >>> oct( int(str(111), 2) )
    '0o7'
    >>> oct( int(str(1000), 2) )
    '0o10'
  • decimal to octal

    >>> oct(8)
    '0o10'
    • or

      >>> format( 15, 'o' )
      '17'
      >>> format( 8, 'o' )
      '10'
  • hexadecimal to octal

    >>> oct( 0xf )
    '0o17'

to Decimal

  • binary to decimal

    >>> int( str(11), 2 )
    3
    >>> int( str(1010), 2 )
    10
  • octal to decimal

    >>> 0o10
    8
    >>> int( 0o10 )
    8
    >>> int ( str(10), 8 )
    8
  • hexadecimal to decimal

    >>> int( 0xf )
    15

to Hexadecimal

  • binary to hexadecimal

    >>> hex( int(str(1010), 2) )
    '0xa'
    >>> hex( int(str(1111), 2) )
    '0xf'
  • octal to hexadecimal

    >>> hex(0o10)
    '0x8'
    >>> hex( int('0o17', 8 ))
    '0xf'
  • decimal to hexadecimal

    >>> hex(15)
    '0xf'
    >>> hex(66)
    '0x42'
    • >>> format( 15, 'x' )
      'f'
    • >>> '%x' % 15
      'f'

[!NOTE|label:references:]

Positional notation
or
or
The Big Book of Small Python Projects
The Big Book of Small Python Projects
THE BIG BOOK OF SMALL PYTHON PROJECTS.pdf
nihathalici/The-Big-Book-of-Small-Python-Projects
Ubuntu releases
version capatibility
environment
list included modules
list lib paths
Positional notation
to Binary
to Octal
to Decimal
to Hexadecimal
The Big Book of Small Python Projects