Modify code to achive this, (Universal Solution)

You can use the following to debug:

add_action( 'admin_init', 'wodebug_admin_menu' );

function wodebug_admin_menu() {

    echo '<pre>' . print_r( $GLOBALS[ 'menu' ], TRUE) . '</pre>';
}

This gives (for my setup) the following for the Contact Form 7 plugin menu page:

[27] => Array
   (
      [0] => Formular
      [1] => wpcf7_read_contact_forms
      [2] => wpcf7
      [3] => Contact Form 7
      [4] => menu-top menu-icon-generic toplevel_page_wpcf7 menu-top-last
      [5] => toplevel_page_wpcf7
      [6] => none
   )

get the key and apply in your case.

add_action( 'admin_init', 'wpse_136058_remove_menu_pages' );

function wpse_136058_remove_menu_pages() {

    remove_menu_page( 'edit.php?post_type=acf' );
    remove_menu_page( 'wpcf7' ); // Key place in this
}