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
• 3,060 points
37 views

1 answer to this question.

0 votes
$ to match the end of the string

[^/ \] any character except /
answered Mar 15 by Waseem
• 4,480 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,520 points
72 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
• 4,480 points
61 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 226 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
• 4,480 points
64 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
• 4,480 points
27 views