Translate

Tuesday 19 May 2020

Python tip 2 : expandtabs() function

Let us discuss about the expandtabs() function in python. This is quite helpful when we have tabs specified in our strings and we need to specify faces. There is no way how much amount of space is to be left while using tabs hence this becomes quite handy in such scenarios.



By default the space is 8, however we can specify the number of spaces required. This is quite useful when a string variable is available and instead of formatting the tab spaces from scratch we can simply use this function to get our job done. 

No comments:

Post a Comment