how do i print only the last two letters in a string using regular expression in python?

0 votes
how do we get only say 'last two letters in the string' skipping all other letters?
Mar 13 in Python by Mohammad
• 1,400 points
13 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
$ to match the end of the string

[^/ \] any character except /
answered Mar 15 by Waseem
• 2,070 points

Related Questions In Python

0 votes
1 answer

How do I check if input string is a valid regular expression or not in Python?

Hi. Good question! Well, just like what ...READ MORE

answered Feb 12 in Python by Nymeria
• 3,500 points
14 views
0 votes
0 answers

how do i use the XOR operator in python regular expression?

can u give an example? READ MORE

Mar 26 in Python by Waseem
• 2,070 points
18 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
24 views
0 votes
1 answer

how to install pandas in python

it is very basic to install pandas if ...READ MORE

answered Mar 6 in Python by Waseem
• 2,070 points
20 views
0 votes
1 answer

How to extract values from a string or a sequence?

you could use the statements like name[index value ...READ MORE

answered Mar 6 in Python by Waseem
• 2,070 points
15 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.