From ec89c943738d83a62f9fcd2d3c9a69e526be4477 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Thu, 9 Apr 2026 16:01:24 +0200 Subject: [PATCH] aggiunge esercizio 34 --- lab34.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lab34.py diff --git a/lab34.py b/lab34.py new file mode 100644 index 0000000..a94efac --- /dev/null +++ b/lab34.py @@ -0,0 +1,15 @@ +str1 = input("Inserire la prima stringa: ") +str2 = input("Inserire la seconda stringa: ") + +pos = 0 + +for ch in str1: + lettera = str2.find(ch, pos) + + if lettera == -1: + print("No") + break + pos = lettera + 1 +else: + print("Si") + \ No newline at end of file