• 24-03-2023, 20:08:05
    #10
    A.AY adlı üyeden alıntı: mesajı görüntüle


    Gördüğünüz ters slash ' karakteri için kaçış dizisi olarak eklenmiştir ve print edildiğinde gözükmez fakat teknik olarak string değer içinde bu ters slash ın bulunması gerekir.. Yani aldırmanıza gerek yok..

    Örneğin ;

  • 24-03-2023, 20:38:39
    #11
    strVlaue: str = """
    n the gardening world, you\'re likely wondering how to get\e joys of diggin """
    
    print(strVlaue.replace("\\", " ").strip())
    Çıktı

    n the gardening world, you're likely wondering how to get e joys of diggin
  • 24-03-2023, 21:08:04
    #12
    with open("gecicidosya.txt", "r", encoding="utf-8") as f:
    data = f.read()

    data = data.replace("\\", "")
    with open("gecicidosya.txt", "w") as f:
    f.write(data)
  • 24-03-2023, 22:04:54
    #13
    Poena adlı üyeden alıntı: mesajı görüntüle
    strVlaue: str = """
    n the gardening world, you\'re likely wondering how to get\e joys of diggin """
    
    print(strVlaue.replace("\\", " ").strip())
    Çıktı

    n the gardening world, you're likely wondering how to get e joys of diggin
    arlife adlı üyeden alıntı: mesajı görüntüle
    with open("gecicidosya.txt", "r", encoding="utf-8") as f:
    data = f.read()

    data = data.replace("\", "")
    with open("gecicidosya.txt", "w") as f:
    f.write(data)
    sorun jupyter notebook kaynaklı, cmd ile çalıştırınca sorun çıkmadı