You can use the in
operator, for example:
with arcpy.da.UpdateCursor(in_table, field_names) as cursor:
for row in cursor:
if '1.' in row[0]:
row[1] = 1
...
And instead of writing 24 if statements you can use a dictionary:
d = {'1.':1, '2.':2, '3.':3} #add all values here
with arcpy.da.UpdateCursor(in_table, field_names) as cursor:
for row in cursor:
for key in d:
if key in row[0]:
row[1]=d[row[0]]
cursor.updateRow(row)
But this wont work since '2.' is in both '12.' and '22.' so you can do:
row[1] = row[0].split('-')[2].split('.')[0]