Python tricks and python features

Python if for...

  • Web programming(Django, Pyramid,Bottle, Flask...)
  • GUI development(wkPYTHON, tkinter, PyGtk, PyQt...)
  • Scientific and numeric(Scipy, Numpy, Pandas...)
  • Software development(Buildbot, Trac, RoundUp...)
  • System administration(Ansible, Salt, OpenStalk...)
  • Embedded  computing(Raspberry Pi, MicroPython, BeagleBone...)
  • Education(Raspberry Pi, Turtle, Robotics...)

How to take any number of inputs in python without defining any limit?

from sys impot stdin
lines = stdin.read().splitlines()
print(lines)

Check if a string contains a number

def hasnumbers(string):
    return any(char.isdigit() for char in inputstring):

Comments

Post a Comment