<div dir="ltr"><div><br></div><div>Sì, solo per una versione dell'alfabeto. O Maiuscolo o minuscolo.<br><br></div>Per esempio<br>"""<br>In [1]: import string<br><br>In [2]: string.ascii_uppercase<br>Out[2]: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'<br><br>In [3]: every_uppercase_char = set(string.ascii_uppercase)<br><br>In [4]: example = set("the quick brown fox jumps over the lazy dog".upper())<br><div class="gmail_extra"><br></div><div class="gmail_extra">In [5]: not(every_uppercase_char - example)<br>Out[5]: True<br><br>In [6]: example2 = set("the quick brown fox jumps over the lazy do".upper()) # senza la 'g'<br><br>In [7]: not(every_uppercase_char - example2)<br>Out[7]: False<br></div><div class="gmail_extra">"""</div><div class="gmail_extra"><br></div><div class="gmail_extra">Da notare che faccio la sottrazione in un verso per evitare problemi con la punteggiatura e gli spazi</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-07 13:47 GMT+02:00 Michele Finelli <span dir="ltr"><<a href="mailto:m@pavis.biodec.com" target="_blank">m@pavis.biodec.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">* Andrea D'Amore (<a href="mailto:and.damore@gmail.com" target="_blank">and.damore@gmail.com</a>) [170907 13:35]:<span class="gmail-"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
[…]<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
La soluzione migliore passa per i set<br>
</blockquote>
<br>
Come:<br>
<br>
set('abcdefghijklmnopqrstuvwx<wbr>yz') <= set(test_sentence)<br>
<br>
?<br>
<br>
</blockquote>
<br></span>
non ci vuole anche un .lower() ?<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
-- <br>
.*. finelli<br>
/V\<br>
(/ \) ------------------------------<wbr>------------------------------<wbr>--<br>
( ) Linux: Friends dont let friends use Piccolosoffice<br>
^^-^^ ------------------------------<wbr>------------------------------<wbr>--<br>
<br>
Am'ar'c'mand, fe` pulid.</font></span><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
______________________________<wbr>_________________<br>
Python mailing list<br>
<a href="mailto:Python@lists.python.it" target="_blank">Python@lists.python.it</a><br>
<a href="https://lists.python.it/mailman/listinfo/python" rel="noreferrer" target="_blank">https://lists.python.it/mailma<wbr>n/listinfo/python</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">There is a crack, a crack in everything. That’s how the light gets in<br>L. Cohen</div>
</div></div>