• Python: Length or size of list, tuple, array

    How to get the length of a list or tuple or array in Python Let me clarify something at the beginning, by array, you probably mean list in Python. list is the equivalent of arrays in JavaScript or PH...

  • Python: Difference between list and tuple

    What is the difference between list and tuple in Python? To put it simply, tuples are lists which can't be edited. Once you create a tuple, you cannot edit it, it is immutable. Lists on the other han...

  • Python: Split string method and examples

    How to split string in Python So you are looking to break up a string into smaller strings (into an array if you are coming from a PHP / JavaScript background) based on a delimiter or character. Pyth...

  • Python: Check if a character or substring is in a string

    How to check if a character / substring is in a string or not Let me start with a little history about myself. I have been developing on the Web for more than five years now - in PHP. Yes, in goddamn...

  • Python: Difference between urllib and urllib2

    What is the difference between urllib and urllib2 modules of Python? You might be intrigued by the existence of two separate URL modules in Python - urllib and urllib2. Even more intriguing: they are...

  • Python: Get version information

    How to get the Python version on your system Getting the version number of your Python installation is not as straightforward as you might have guessed. But once you get the pythonic way of doing thi...