You are viewing a single comment's thread from:

RE: The loops of spring.

in #steempress6 years ago

even though you are clearly making fun of me xD let me entertain you.
They wanted us to create a list of the usernames mentioned in a list of strings. The loop checks the first indice of each string for “@“ which indicate a username in that list (^^;)
Whenever the loop finds such a string, it adds it to a different list. The one made only for usernames.

Better? xD

Sort:  

Yes that is better :)

Not much code to traverse a string, hunt for usernames, and add to a new list!

so the string could be 'nope, @abh12345, dggggg@ned'?

will ned (with @) still get moved to the new list?

❌ that won’t work because “@“ has to be at index 0 for the string to be deemed a username 💮

so is the first list an array of strings, some are usernames and some aren't?

Coin Marketplace

STEEM 0.23
TRX 0.24
JST 0.038
BTC 106188.17
ETH 3309.01
SBD 4.38