Find letter 's position in Alphabet using Bit operation | Python3 implementation of the approach ; Function to calculate the position of characters ; Performing AND operation with number 31 ; Driver code
NUM = 31 NEW_LINE def positions ( str ) : NEW_LINE INDENT for i in str : NEW_LINE INDENT print ( ( ord ( i ) & NUM ) , end = " ▁ " ) NEW_LINE DEDENT DEDENT str = " Geeks " NEW_LINE positions ( str ) NEW_LINE