Tagged: python


python: Unpacking a Tuple into Separate Variables

In the article we will look forward to unpacking a tuple or sequence into separate variables. Suppose you have an (n)-element tuple or sequence that you would like to unpack into a collection of n variables. Any sequence or tuple...


Python3 : How to pad zeroes or any character to a string?

This article discusses about two ways to pad either to the left or right of a string with zeros, spaces or any character. Left padding : Left padding means adding characters like zeroes or spaces or any character to the...