diff options
Diffstat (limited to 'docs/examples/tutorial/string/if_char_in.pyx')
-rw-r--r-- | docs/examples/tutorial/string/if_char_in.pyx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/examples/tutorial/string/if_char_in.pyx b/docs/examples/tutorial/string/if_char_in.pyx new file mode 100644 index 000000000..aa684bcee --- /dev/null +++ b/docs/examples/tutorial/string/if_char_in.pyx @@ -0,0 +1,5 @@ +cpdef void is_in(Py_UCS4 uchar_val):
+ if uchar_val in u'abcABCxY':
+ print("The character is in the string.")
+ else:
+ print("The character isn't in the string")
|