diff options
Diffstat (limited to 'docs/examples/tutorial/string/for_unicode.pyx')
-rw-r--r-- | docs/examples/tutorial/string/for_unicode.pyx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/examples/tutorial/string/for_unicode.pyx b/docs/examples/tutorial/string/for_unicode.pyx new file mode 100644 index 000000000..aabd562e4 --- /dev/null +++ b/docs/examples/tutorial/string/for_unicode.pyx @@ -0,0 +1,6 @@ +cdef unicode ustring = u'Hello world'
+
+# NOTE: no typing required for 'uchar' !
+for uchar in ustring:
+ if uchar == u'A':
+ print("Found the letter A")
|