Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in python would you please help me to keep this code as in a simple and easy code to follow please I want the code
in python would you please help me to keep this code as in a simple and easy code to follow please
I want the code to run like first line of the letters
['B', 'C', 'D', 'BC', 'CB', 'BD', 'BCB', 'CBD', 'BCBD']
['B', 'BC', 'BCB', 'BCBD', 'C', 'CB', 'CBD', 'BD', 'D']
word="BCBD" lst=[] for i in range(len(word)): for j in range(i+1,len(word)+1): if word [i:j] not in lst: lst.append(word[i:j]) print(lst)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started