The document defines a grammar with a key and value entered by the user. It finds all capital letters in the value and prompts the user to input a value for each. It then updates the value by appending the user inputs and prints the updated grammar.
The document defines a grammar with a key and value entered by the user. It finds all capital letters in the value and prompts the user to input a value for each. It then updates the value by appending the user inputs and prints the updated grammar.
The document defines a grammar with a key and value entered by the user. It finds all capital letters in the value and prompts the user to input a value for each. It then updates the value by appending the user inputs and prints the updated grammar.
v=g[2:] key=g[:2] grammar = {key:v} print("First grammar is : " + str(grammar)) a = r.findall("[A-Z]", v) ##d=re.search("[A-Z]",v) ##print(d.start()) value1='' if (len(a)!=0): for i in range(len(a)): c=a[i] value1=input(("Please, enter the value of : " + c + " : "))
v=v[:-1] value2=v+value1 grammar2={key:value2} print("Second grammar is : " + str(grammar2))