How do I write code to find words that are in the same specified position in a string. The position should be like this:
An example:
And it will return the result:
This is because 'a' has no pair therefore it is counted. As for 'boy', 'b' is on the same position of 'y' and 'o' has no pair while for 'aloz', 'a' is in the same position with 'z' and 'l' is in the same position as 'o'.
I will really appreciate anyone who can help me with this.
Code:
word1= ('a','b','c','d','e','f','g','h','i','j','k','l','m')
word2= ('z','y','x','w','v','u','t','s','r','q','p','o','n')
word1[n] == word2[n]
Code:
text = "A boy is being bully by Aloz"
Code:
['a','boy','aloz']
I will really appreciate anyone who can help me with this.
Comment