Difference between revisions of "Z3/Z3Clarifications"
Jump to navigation
Jump to search
m |
|||
Line 6: | Line 6: | ||
List clarifications required on Z3 | List clarifications required on Z3 | ||
− | + | How do we get a subset of a string value without using loop | |
Ans: | Ans: | ||
Line 13: | Line 13: | ||
vowels ="AEIOU"; | vowels ="AEIOU"; | ||
vowelsarray=vowels.split(""); | vowelsarray=vowels.split(""); | ||
− | |||
wordletterswithoutvowels=word.split("").filter((x)=>!x.isin(vowelsarray)); | wordletterswithoutvowels=word.split("").filter((x)=>!x.isin(vowelsarray)); | ||
OR | OR | ||
Line 23: | Line 22: | ||
Result => CRPRTN | Result => CRPRTN | ||
− |
Revision as of 07:26, 25 August 2016
Z3 Clarifications
List clarifications required on Z3
How do we get a subset of a string value without using loop
Ans:
word = "CORPORATION"; vowels ="AEIOU"; vowelsarray=vowels.split(""); wordletterswithoutvowels=word.split("").filter((x)=>!x.isin(vowelsarray)); OR IsNotAVowel:=!x.isin(vowelsarray); word.split("").filter(IsNotAVowel); OR IsNotAVowel:=!x.isin("AEIOU".split("")); word.split("").filter(IsNotAVowel);
Result => CRPRTN