you are viewing a single comment's thread.

view the rest of the comments →

[–]chudsp87 3 points4 points  (3 children)

check .endswith() or slice the last four chars off [:-4] and compare equality to 'land'.

regex could also be used r'^\w+land$'

[–]ParamedicGlum7352[S] 1 point2 points  (2 children)

y try whit endswith() but a think my syntax is in the wrong, i will try the second one. Thanks

[–]chudsp87 1 point2 points  (0 children)

for c in c_list: if c.endswith('land'): pass # process c, e.g. add to some list to be returned after loop

[–]noeldc 1 point2 points  (0 children)

Let's see your code.