Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 13 Online
OpenStudy (anonymous):

PS3: I'm trying to do the from string import * and subsequently the find("atgc", ....) but it doesn't seem to recognise "find" or "str.find" or "string.find". :/

OpenStudy (anonymous):

http://dpaste.com/707514/

OpenStudy (anonymous):

Try either this: from string import * target = 'banana' key = 'na' b = target.find(key) print b or from string import * target = 'banana' key = 'na' b = find(target, key) print b realize you can put the 'raw' string into the find command or a variable and keep at it! lukec

OpenStudy (anonymous):

also - the 'str' of str.find(.....) is the variable name of the target string and not actually 'str' (in case that wasn't clear)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!