import re matches = re.search("a=(\d+(?:\.\d+)?)", "var k = 2;var a; a=46")print(matches.group(1))# your code goes here
Standard input is empty
46
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!