-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathharry_code par.py
39 lines (37 loc) · 1000 Bytes
/
harry_code par.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Story = "once upon a time there was a town name was a texas"
# print(Story[0:9])
# print(len(Story))
# print(Story.endswith("Botson"))
# print(Story.count("0"))
# print(Story.capitalize())
# print(Story.find('time'))
# print(Story.replace("texas",'Botson'))
# LIST & TUPLES
# Create a list using[]
# a=[1,2,3,4,5,6,7,80]
# print(a[2])
# a[0]=6
# print(a)
# We Can Create a List With Items Of Different Types
# r1 = [3,4,45,54,68,876,422,434]
# r1.sort()
# print(r1)
# r1 = [3,4,45,54,68,876,422,434]
# r1.reverse()
# print(r1)
# r1 = [3,4,45,54,68,876,422,434]
# r1.insert(1,43,22)
# print(r1)
# from numpy import set_string_function
# import regex as re
# Get some string as input
# string = set_string_function()
# List to store all the matches
# matches=[]
# Iterate over the input strings for string in stringS
# compile the regex
# rex=re.compile(r'[a-2]+')
# Check the string against the regex
# matches=rex.findall (string)
# finally append the matches to list
# matches.extend(matches)