D.Trump said that Nancy Pelosi was "not operating with a full deck". Does it mean the same as not play with a full deck?
I searched in some dictionaries but didn't find the first phrase there.
Don't make the mistake of assuming Trump is using English correctly.
"Not operating with a full deck" is not a saying.
He probably meant to say "not playing with a full deck".
Or
He may have started saying "not operating at full capacity" but then mixed up the two phrases which mean the same thing.
If he did mix up the two phrases, then it is called a malaphor!
A Malaphor is a phrase made from two popular phrases, often unintentionally. Here are some more examples of malaphors like what Trump said: Malaphor Examples
Here's one:
An early bird gathers no moss!
That is a blend of two idioms:
1. The early bird catches the worm.
2. A rolling stone gathers no moss.
Yes. The idiom is "not playing with a full deck" (which Google's dictionary defines as North American slang for "mentally deficient"). Trump made a mistake (as Jay has pointed out here, Trump's version is a malaphor, a blending of two idioms), but he almost certainly meant the same thing.
Some idioms are fully frozen and others are more flexible. What I mean is that some idioms lose their special, idiomatic meaning if you make any changes to their wording, but other idioms can be slightly changed and still mean the same thing. To operate with, in this utterance, means something very general, like to use. (It has nothing to do with operation as in a surgical procedure, if that's what was confusing you.) We use cards by playing with them, so people who are familiar with the idiom "playing with a full deck" can easily understand Trump's version "operating with a full deck" to mean the same thing.
Trump's not the first person to say "operate with a full deck" (if you Google the phrase and poke around in the results, you can find some examples), but it's not the common/accepted idiom. If you want to use this idiom, you should use the "playing" version.