📌  相关文章
📜  检查字符串最后一个字母python代码示例

📅  最后修改于: 2022-03-11 14:45:34.980000             🧑  作者: Mango

代码示例1
sample_str = 'Sample String'
# Get last character of string i.e. char at index position -1
last_char = sample_str[-1]
 
print('Last character : ', last_char)
# Output
Last charater : g