Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Z3/Z3Clarifications
(view source)
Revision as of 11:19, 25 August 2016
566 bytes added
,
11:19, 25 August 2016
m
no edit summary
Line 5:
Line 5:
List clarifications required on Z3
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
+
-----------------------------------------------------------------------------------------
Abin
writer
5,435
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Community portal
Current events
Recent changes
Help
Tools
ZCubes Web Platform
Printable version