Problem 28

2 comments on “Problem 28”


  • SWATI

    import java.util.*;
    public class Main
    {
    public static void main (String[]args)
    {
    Scanner sc = new Scanner (System.in);
    String mainStr = sc.nextLine ();
    String searchStr = sc.nextLine ();

    if (mainStr.contains (searchStr))
    System.out.println (“TRUE”);
    else
    System.out.println (“FALSE”);

    }
    }


  • Mohd Saif

    search_string=input(“Enter the search_string:\n”)
    pattern_string=input(“Enter the pattern_string:\n”)
    if pattern_string in search_string:
    print(“True”)
    else:
    print(“False”)