Created
November 18, 2020 17:09
-
-
Save internetova/99ee222ded150640ddd3cb5d576cfbb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
// Вывести на экран количество уникальных слов в тексте. | |
const text = ''' | |
She sells sea shells on the sea shore | |
The shells that she sells are sea shells I'm sure | |
So if she sells sea shells on the sea shore | |
I'm sure that the shells are sea shore shells | |
'''; | |
final textSet = text.split(' ').toSet(); | |
print('Число уникальных слов ${textSet.length}'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment