Plus High Waist Cow Print Ripped Frayed Hem Denim Shorts

Plus High Waist Cow Print Ripped Frayed Hem Denim Shorts


Looking for something fun and flirty? Check out our plus size high waist cow print ripped frayed hem denim shorts! They’re perfect for a day out or a night on the town.
$25.00 Sizes XS&S-Small$80.00-XSSIZESQ:

How to use a regex in a loop

so basically I have a list of strings like that :
A = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’] A1 = [‘a’, ‘b’, ‘i’]

I tried this :
A = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’] B = [] for i in A:
if re.search(‘g’, i).groups()[0]!= ‘g’:
new_A = i.split()
B.append(new_A)

print(A)
print(B)

print(B1)

What it does is that it splits my list but sometimes it splits it wrongly. For exemple I expect that B look like that :
[[a, b, i], [c, d, j], [e, f, k]]

but I always get this :
[[‘a’, ‘b’, ‘i’], [‘c’, ‘d’, ‘k’], [‘e’, ‘f’, ‘k’]]

A:

This would do:
A = [‘a’, ‘b’, ‘i’, ‘j’] for val in A:
for i, char in enumerate(val):
if char!= ‘j’:
break # no need to repeat with the other char
if i == 0:
val[1:i+1] = val[1:i+1] + char # or just val1: = val[1:] + char

Output:
[‘a’, ‘a’, ‘j’]

Cameron’s warning: The UK could be on the brink of a second world war if parliament accepts Brexit

FREE now and never miss the top politics stories again. SUBSCRIBE Invalid email Sign up fornow and never miss the top politics

Leave a Reply